#
# Copyright (C) 2004-2009 Andrew Beekhof
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
MAINTAINERCLEANFILES    = Makefile.in

EXTRA_DIST		= pacemaker.pc.in pacemaker-pe_rules.pc.in pacemaker-pe_status.pc.in libpacemaker.pc.in $(target_LIBS:%=%.in)

LIBS			= cib lrmd service fencing cluster

target_LIBS		= $(LIBS:%=pacemaker-%.pc) libpacemaker.pc

target_PACKAGE		= pacemaker.pc

all-local: $(target_LIBS) $(target_PACKAGE)

install-exec-local: $(target_LIBS) $(target_PACKAGE)
	$(INSTALL) -d $(DESTDIR)/$(libdir)/pkgconfig
	$(INSTALL) -m 644 $(target_LIBS) $(target_PACKAGE) $(DESTDIR)/$(libdir)/pkgconfig
	$(INSTALL) -m 644 pacemaker-pe_rules.pc pacemaker-pe_status.pc $(DESTDIR)/$(libdir)/pkgconfig

uninstall-local:
	cd $(DESTDIR)/$(libdir)/pkgconfig && rm -f $(target_LIBS) $(target_PACKAGE)
	rmdir $(DESTDIR)/$(libdir)/pkgconfig 2> /dev/null || :

clean-local:
	rm -f *.pc

## Subdirectories...
SUBDIRS	= gnu common pengine cib services fencing lrmd cluster pacemaker
DIST_SUBDIRS =  $(SUBDIRS)
